﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;



public partial class Top : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        lblUnit.Text = Session["用户信息.岗位"].ToString();
        lblUser.Text = Session["用户信息.姓名"].ToString();

        SetDateTxt();
    }

    private void SetDateTxt()
    {
        //根据取得的英文单词返回汉字
        DateTime dtNow = DateTime.Now;

        String dt = dtNow.DayOfWeek.ToString();
        String week = "";

        switch (dt)
        {
            case "Monday":
                week = "星期一"; break;
            case "Tuesday":
                week = "星期二"; break;
            case "Wednesday":
                week = "星期三"; break;
            case "Thursday":
                week = "星期四"; break;
            case "Friday":
                week = "星期五"; break;
            case "Saturday":
                week = "星期六"; break;
            case "Sunday":
                week = "星期日"; break;
        }

        time.Text = DateTime.Now.ToString("yyyy年MM月dd日") + " " + week;
    }

    
}